var baseUrl = "http://www.itcbc.com:8080";
$.ajaxPrefilter(function (options) {
    options.url = baseUrl + options.url
    if (options.url.includes('/my/')) {
        options.headers = {
            Authorization: localStorage.getItem('token')
        }
        options.complete = function (xhr) {
            if (xhr.responseJSON && xhr.responseJSON.status === 1 && xhr.responseJSON.message === '身份认证失败!') {
                localStorage.removeItem('token')
                // window.parent.location.href = "./login.js"
                location.href = "./login.html"
            }

        }
    }
});

